package com.mapper;

import com.domain.Order;
import com.domain.User;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface Ordermapper {
    @Select("select * from mybatis.order")
    @Results(value = {
//            //id字段默认为false，表示不是主键
//            //column表示数据库表字段，property表示实体类属性名。
           @Result(id = true,column = "id",property = "id"),
          @Result(column = "order_no",property = "order_no"),
           @Result(column = "order_status",property = "order_status"),
           @Result(column = "pay_status",property = "pay_status"),
          @Result(column = "money",property = "money"),
          @Result(column = "create_time",property = "create_time"),
          @Result(column = "user_id",property = "user_id"),

    })

    List<Order> findallorder();
}
